bitkeeper revision 1.1159.1.97 (412a08767NwPLKMuv2wKJw0mVgoNjg)
authoriap10@labyrinth.cl.cam.ac.uk <iap10@labyrinth.cl.cam.ac.uk>
Mon, 23 Aug 2004 15:08:38 +0000 (15:08 +0000)
committeriap10@labyrinth.cl.cam.ac.uk <iap10@labyrinth.cl.cam.ac.uk>
Mon, 23 Aug 2004 15:08:38 +0000 (15:08 +0000)
2.6 update_va_mapping on demand fault path (currently disabled)

linux-2.6.7-xen-sparse/include/asm-xen/asm-i386/pgtable.h

index e1c2031a717aec670de5f7297807625da7746b51..8da63ab5a4cac987613f5823cd52ee1e1fd0c23d 100644 (file)
@@ -361,6 +361,8 @@ static inline pte_t pte_modify(pte_t pte, pgprot_t newprot)
  */
 #define update_mmu_cache(vma,address,pte) do { } while (0)
 #define  __HAVE_ARCH_PTEP_SET_ACCESS_FLAGS
+
+#if 1
 #define ptep_set_access_flags(__vma, __address, __ptep, __entry, __dirty) \
        do {                                                              \
                if (__dirty) {                                            \
@@ -368,6 +370,21 @@ static inline pte_t pte_modify(pte_t pte, pgprot_t newprot)
                        flush_tlb_page(__vma, __address);                 \
                }                                                         \
        } while (0)
+#else
+#define ptep_set_access_flags(__vma, __address, __ptep, __entry, __dirty) \
+       do {                                                              \
+               if (__dirty) {                                            \
+                       if ( likely(vma->vm_mm == current->mm) ) {        \
+                           xen_flush_page_update_queue();                \
+                           HYPERVISOR_update_va_mapping(address>>PAGE_SHIFT, entry, UVMF_INVLPG); \
+                       } else {                                          \
+                            queue_l1_entry_update((__ptep), (__entry).pte_low); \
+                           xen_flush_page_update_queue();                \
+                       }                                                 \
+               }                                                         \
+       } while (0)
+
+#endif
 
 /* Encode and de-code a swap entry */
 #define __swp_type(x)                  (((x).val >> 1) & 0x1f)